Page({
    data: {
        img_fileList: [],
        video_fileList: [],
        value: '',
        evaluate_level: ''
    },
    Image_afterRead(event) {
        const { file } = event.detail;
        let { img_fileList = [] } = this.data;
        file.forEach(item => {
            img_fileList.push(item);
        })
        this.setData({ img_fileList });
        // 当设置 mutiple 为 true 时, file 为数组格式，否则为对象格式
        // wx.uploadFile({
        //     url: 'https://example.weixin.qq.com/upload',
        //     filePath: file.url,
        //     name: 'file',
        //     formData: { user: 'test' },
        //     success(res) {
        //         // 上传完成需要更新 fileList
        //         const { fileList = [] } = this.data;
        //         fileList.push({ ...file, url: res.data });
        //         this.setData({ fileList });
        //     },
        // });
    },
    delete_image(e) {
        let { img_fileList = [] } = this.data;
        img_fileList.splice(e.detail.index, 1);
        this.setData({ img_fileList });

    },
    video_afterRead(event) {
        // const { url } = event.detail.file
        // let { video_fileList = [] } = this.data
        // video_fileList.push(url)
        // this.setData({ video_fileList })
    },
    onChange(event) {
        this.setData({
            evaluate_level: event.detail,
        });
    },
    upload() {}
})